// Peripheral: USB_Periph  Universal Serial Bus Full Speed Device.
// Instances:
//  USB  mmap.USB_BASE
// Registers:
//  0x00 16  EP0R          Endpoint 0 register.
//  0x02 16  RESERVED0     Reserved.
//  0x04 16  EP1R          Endpoint 1 register.
//  0x06 16  RESERVED1     Reserved.
//  0x08 16  EP2R          Endpoint 2 register.
//  0x0A 16  RESERVED2     Reserved.
//  0x0C 16  EP3R          Endpoint 3 register.
//  0x0E 16  RESERVED3     Reserved.
//  0x10 16  EP4R          Endpoint 4 register.
//  0x12 16  RESERVED4     Reserved.
//  0x14 16  EP5R          Endpoint 5 register.
//  0x16 16  RESERVED5     Reserved.
//  0x18 16  EP6R          Endpoint 6 register.
//  0x1A 16  RESERVED6     Reserved.
//  0x1C 16  EP7R          Endpoint 7 register.
//  0x1E 16  RESERVED7[17] Reserved.
//  0x40 16  CNTR          Control register.
//  0x42 16  RESERVED8     Reserved.
//  0x44 16  ISTR          Interrupt status register.
//  0x46 16  RESERVED9     Reserved.
//  0x48 16  FNR           Frame number register.
//  0x4A 16  RESERVEDA     Reserved.
//  0x4C 16  DADDR         Device address register.
//  0x4E 16  RESERVEDB     Reserved.
//  0x50 16  BTABLE        Buffer Table address register.
//  0x52 16  RESERVEDC     Reserved.
//  0x54 16  LPMCSR        LPM Control and Status register.
//  0x56 16  RESERVEDD     Reserved.
// Import:
//  stm32/o/f303xe/mmap
package usb

// DO NOT EDIT THIS FILE. GENERATED BY stm32xgen.

const (
	CTRM     CNTR = 0x01 << 15 //+ Correct TRansfer Mask.
	PMAOVR   CNTR = 0x01 << 14 //+ DMA OVeR/underrun Mask.
	ERRM     CNTR = 0x01 << 13 //+ ERRor Mask.
	WKUPM    CNTR = 0x01 << 12 //+ WaKe UP Mask.
	SUSPM    CNTR = 0x01 << 11 //+ SUSPend Mask.
	RESETM   CNTR = 0x01 << 10 //+ RESET Mask.
	SOFM     CNTR = 0x01 << 9  //+ Start Of Frame Mask.
	ESOFM    CNTR = 0x01 << 8  //+ Expected Start Of Frame Mask.
	L1REQM   CNTR = 0x01 << 7  //+ LPM L1 state request interrupt mask.
	L1RESUME CNTR = 0x01 << 5  //+ LPM L1 Resume request.
	RESUME   CNTR = 0x01 << 4  //+ RESUME request.
	FSUSP    CNTR = 0x01 << 3  //+ Force SUSPend.
	LPMODE   CNTR = 0x01 << 2  //+ Low-power MODE.
	PDWN     CNTR = 0x01 << 1  //+ Power DoWN.
	FRES     CNTR = 0x01 << 0  //+ Force USB RESet.
)

const (
	CTRMn     = 15
	PMAOVRn   = 14
	ERRMn     = 13
	WKUPMn    = 12
	SUSPMn    = 11
	RESETMn   = 10
	SOFMn     = 9
	ESOFMn    = 8
	L1REQMn   = 7
	L1RESUMEn = 5
	RESUMEn   = 4
	FSUSPn    = 3
	LPMODEn   = 2
	PDWNn     = 1
	FRESn     = 0
)

const (
	CTR    ISTR = 0x01 << 15 //+ Correct TRansfer (clear-only bit).
	PMAOVR ISTR = 0x01 << 14 //+ DMA OVeR/underrun (clear-only bit).
	ERR    ISTR = 0x01 << 13 //+ ERRor (clear-only bit).
	WKUP   ISTR = 0x01 << 12 //+ WaKe UP (clear-only bit).
	SUSP   ISTR = 0x01 << 11 //+ SUSPend (clear-only bit).
	RESET  ISTR = 0x01 << 10 //+ RESET (clear-only bit).
	SOF    ISTR = 0x01 << 9  //+ Start Of Frame (clear-only bit).
	ESOF   ISTR = 0x01 << 8  //+ Expected Start Of Frame (clear-only bit).
	L1REQ  ISTR = 0x01 << 7  //+ LPM L1 state request.
	DIR    ISTR = 0x01 << 4  //+ DIRection of transaction (read-only bit).
	EP_ID  ISTR = 0x0F << 0  //+ EndPoint IDentifier (read-only bit).
)

const (
	CTRn    = 15
	PMAOVRn = 14
	ERRn    = 13
	WKUPn   = 12
	SUSPn   = 11
	RESETn  = 10
	SOFn    = 9
	ESOFn   = 8
	L1REQn  = 7
	DIRn    = 4
	EP_IDn  = 0
)

const (
	RXDP FNR = 0x01 << 15 //+ status of D+ data line.
	RXDM FNR = 0x01 << 14 //+ status of D- data line.
	LCK  FNR = 0x01 << 13 //+ LoCKed.
	LSOF FNR = 0x03 << 11 //+ Lost SOF.
	FN   FNR = 0x7FF << 0 //+ Frame Number.
)

const (
	RXDPn = 15
	RXDMn = 14
	LCKn  = 13
	LSOFn = 11
	FNn   = 0
)

const (
	EF  DADDR = 0x01 << 7 //+ USB device address Enable Function.
	ADD DADDR = 0x7F << 0 //+ USB device address.
)

const (
	EFn  = 7
	ADDn = 0
)

const (
	BESL    LPMCSR = 0x0F << 4 //+ BESL value received with last ACKed LPM Token.
	REMWAKE LPMCSR = 0x01 << 3 //+ bRemoteWake value received with last ACKed LPM Token.
	LPMACK  LPMCSR = 0x01 << 1 //+ LPM Token acknowledge enable.
	LMPEN   LPMCSR = 0x01 << 0 //+ LPM support enable.
)

const (
	BESLn    = 4
	REMWAKEn = 3
	LPMACKn  = 1
	LMPENn   = 0
)
